package com.chixing.day18_thread.word;

import org.apache.poi.ss.formula.functions.T;

public class Sale {
    private int count = 20;

    public synchronized void sale(){
        if (count>0){
            count--;
            System.out.println(Thread.currentThread().getName()+"卖了1张票,还剩"+count);
        }
    }

}
